﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QuanLyDaiLyVersion2.XuLyLuuTru;
using QuanLyDaiLyVersion2.XuLyDuLieu;

namespace QuanLyDaiLyVersion2.XuLyTinhToan
{
    public class NguoiDungBUS
    {
        public static bool chungThucNguoiDung(string ten, string matKhau)
        {
            List<NguoiDungDTO> lst = NguoiDungDAO.dsNguoiDung();
            foreach (NguoiDungDTO user in lst)
            {
                if (ten == user.TenNguoiDung && matKhau == user.MatKhau)
                {
                    return true;
                }
            }

            return false;
        }

        public static bool update(NguoiDungDTO nd, int index)
        {
            return NguoiDungDAO.thayDoiTKvaMK(nd, index);
        }

    }
}
